package singleton;

import java.net.URL;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;

import run.Activator;

public class StoredImages {
	
private static ImageRegistry registry = new ImageRegistry();;	// Speicher für die Bilder
	
	/* Die Bilder: */
	private ImageDescriptor imageD1 = null;
	private ImageDescriptor imageD2 = null;
	private ImageDescriptor imageD3 = null;
	private ImageDescriptor imageA = null;
	private ImageDescriptor imageD = null;
	private ImageDescriptor imageAdd = null;
	
	private static final StoredImages INSTANCE = new StoredImages();
	
	private StoredImages(){	
		/* Initialisierung des Speichers und der Bilder */
		URL url1 = Activator.getDefault().getBundle().getResource("icons/editcopy.png");
		imageD1 = ImageDescriptor.createFromURL(url1); 
		registry.put("EDIT", imageD1);
		URL url2 = Activator.getDefault().getBundle().getResource("icons/infocopy.png");
		imageD2 = ImageDescriptor.createFromURL(url2); 
		registry.put("INFO", imageD2);
		URL url3 = Activator.getDefault().getBundle().getResource("icons/commentcopy.png");
		imageD3 = ImageDescriptor.createFromURL(url3); 
		registry.put("COM", imageD3);
		URL url6 = Activator.getDefault().getBundle().getResource("icons/newcopy.png");
		imageAdd = ImageDescriptor.createFromURL(url6); 
		registry.put("ADD", imageAdd);
	}
	
	public static StoredImages getInstance(){
		return INSTANCE;
	}
	
	public static ImageRegistry getMyImageRegistry() {
		return registry;
	}

}
